
function Grid_overTitle_left(obj){

	obj.className = "grid_sort_on align_left";
	obj.style.cursor='pointer';
}
function Grid_outTitle_left(obj){
	obj.className = "align_left";
	obj.style.cursor='default';
}
function Grid_overTitle_right(obj){
	obj.className = "grid_sort_on align_right";
	obj.style.cursor='pointer';
}
function Grid_outTitle_right(obj){
	obj.className = "align_right";
	obj.style.cursor='default';
}

function Grid_clickDiv(obj){
	obj.style.display = "block";
	}
function Grid_outDiv(obj){
	obj.style.display = "none";
}

var gListOver = null;
function Table_overListTr(obj){
	if (obj != gListOver)
		obj.className = "line_listTable_record_over";
}
function Table_outListTr(obj){
	if(obj != gListOver){
		obj.className = "line_listTable_record_off";
	}
}
function Table_clickListTr(obj){
	if(gListOver == null){
		obj.className = "line_listTable_record_on";
	} else {
		if (gListOver != obj) {
			gListOver.className = "line_listTable_record_off";
			obj.className = "line_listTable_record_on";
		}
	}
	gListOver = obj;
}

function column_hide_display(t_id,i_id){
	var t_id;
	var i_id;
	var on_img="/res/images/arrowRight.gif";//
	var off_img="/res/images/arrowLeft.gif";//
	if (t_id.style.display == "none") {
	t_id.style.display="";
	i_id.src=on_img;}
	else{
	t_id.style.display="none";
	i_id.src=off_img;}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function SetDivPosition(obj)
{
	var top = window.event.y + 5;
	var left = window.event.x + 10;
	if(left+ obj.clientWidth > document.body.clientWidth)
		obj.style.left=left-obj.clientWidth;
	else
		obj.style.left=left
	//	alert(left+ obj.clientWidth);
	if(top+obj.clientHeight > document.body.clientHeight)
		obj.style.top=top-obj.clientHeight;
	else
		obj.style.top=top;
}


var rand1 = 0;
var useRand = 0;

images = new Array;
images[1] = new Image();
images[1].src = "../../images/ico_table_up.gif";
images[2] = new Image();
images[2].src = "../../images/ico_table_down.gif";


function swapPic() {
var imgnum = images.length - 1;
do {
var randnum = Math.random();
rand1 = Math.round((imgnum - 1) * randnum) + 1;
} while (rand1 == useRand);
useRand = rand1;
document.randimg.src = images[useRand].src;
}

var gListOver = null;
function house_outListTr(obj){
	if(obj != gListOver){
		obj.className = "td_listTable_record_off";
	}
}
function house_clickListTr(obj){
	if(gListOver == null){
		obj.className = "td_listTable_record_on";
	} else {
		if (gListOver != obj) {
			gListOver.className = "td_listTable_record_off";
			obj.className = "td_listTable_record_on";
		}
	}
	gListOver = obj;
}


var old=1;
function drogbtn_change(i){
	old=i
}
function drogbtn_over(i){
	var new_td11="drogbtn1_"+i+"1";
	eval("document.all."+new_td11).className="drog_btn_on";
 }
function drogbtn_out(i){
	var new_td11="drogbtn1_"+i+"1";
	eval("document.all."+new_td11).className="";
 }

function secBoard(n)
{
 for(i=0;i<secTable.cells.length;i++)
  secTable.cells[i].className="statusbarico";
 secTable.cells[n].className="statusbarico";
 for(i=0;i<mainTable.tBodies.length;i++)
  mainTable.tBodies[i].style.display="none";
 mainTable.tBodies[n].style.display="block";
}
function search_Search(n)
{
 for(i=0;i<secTable.cells.length;i++)
  secTable.cells[i].className="statusbarico";
 secTable.cells[n].className="statusbarico";
 for(i=0;i<mainTable.tBodies.length;i++)
  mainTable.tBodies[i].style.display="none";
 mainTable.tBodies[n].style.display="block";
}
function hide_display_room(t_id,i_id){
var on_img="/res/images/ico_index_start.gif";
var off_img="/res/images/ico_index_shrinkage.gif";
if (t_id.style.display == "") {
t_id.style.display="none";
i_id.src=off_img;}
else{
t_id.style.display="";
i_id.src=on_img;}
}

function show_hide_right(img)
{
	document.getElementById("ifra_right").style.display="block";
}
function grid_search_result(btn)
{
	document.getElementById("simple").style.display="none";
	document.getElementById("simple_pageNum").style.display="none";
	document.getElementById("full").style.display="block";
	document.getElementById("full_pageNum").style.display="block";
}

function OpenWinPlanSelRoom()
{
	var abc=window.showModalDialog('Aux_house-search_plan_info.htm',window,	'dialogWidth:700px;dialogHeight:528px;help:no;status:no;scroll:no;center')
	if (abc==1){
	OpenWinOrdeMana(abc);
	}
}
function OpenWinOrdeMana(abc)
{

if (abc==1){ abc=window.showModalDialog('Aux_Subscribes_Customer.htm',window,'dialogWidth:650px;dialogHeight:630px;help:no;status:no;scroll:no;center')
}

if (abc==2){

abc = window.showModalDialog
('Aux_Subscribes_man.htm',window,'dialogWidth:650px;dialogHeight:576px;help:no;status:no;scroll:no;center');

	if (abc==1){
		OpenWinOrdeMana(abc);
	}
}
if(abc==3){

abc = window.showModalDialog
('Aux_Subscribes_Pay.htm',window,'dialogWidth:650px;dialogHeight:476px;help:no;status:no;scroll:no;center');
	if (abc==2){
		OpenWinOrdeMana(abc);
	}
}

}

var pListOver = null;
function Price_outListTr(obj){
	if(obj != pListOver){
		obj.className = "Price_table_Content_sum22";
	}
}
function Price_clickListTr(obj){
	if(pListOver == null){
		obj.className = "Price_table_Content_sum22_on";
	} else {
		if (pListOver != obj) {
			pListOver.className = "Price_table_Content_sum22";
			obj.className = "Price_table_Content_sum22_on";
		}
	}
	pListOver = obj;
}